<?php

header('content-type:text/html;charset=UTF-8');
/**
	编程思想
*/
//获取数据
$conn = mysqli_connect('localhost','root','rootfmy','edu');
$result = mysqli_query($conn,"SELECT * FROM student");
if($result && mysqli_num_rows($result)>0){
	$rows = mysqli_fetch_all($result,MYSQLI_ASSOC);  //$rows是二维数组
}else{
	echo '<h2>没有数据返回</h2>';
}